
<div class="popup-statistic">
    <div class="top_search">
        <table border=0 class="tbl-popup1">
            <tr>
                <td>フィルタ</td>
                <td colspan="2">
                    <input type="text" name="PEDE_NAME" id="PEDE_NAME" value="<?php echo $this->search_name; ?>" style="width: 270px;" />
                </td>
                
                <td style="width: 10%;"><a href="#"><input name="btnfind" id="btnfind" type="button" class="button" value="検索" /></a></td>
                <td style="width: 10%;"><a href="#"><input name="btnclear" id="btnclear" type="button" class="button" value="クリア " /></a></td>
                <td class="f-right"></td>
            </tr>
        </table>
   </div>
   <div id="the_wrap">
        <div class="the_scroll">
           <table class="adminlist">
        		<thead>
        			<tr>
        				<th class="th20">
        					類型詳細コード	
                        </th>
                        <th class="th40">
                            類型
                        </th>
        				<th class="th40">
                            類型メモ				
                        </th>
        				
        			</tr>
        		</thead>
                <!--<tfoot>
        			<tr>
        				<td colspan="15">
        				    </?php echo $this->pagination->getListFooter(); ?>	
                        </td>
                    </tr>
        		</tfoot>-->
        		
        		<tbody>
                  <?php 
                    if($this->list_pett != null){
                        foreach($this->list_pett as $k=>$row){
                    ?>              
            		  <tr class="row<?php echo $k%2?>">
            			<td class="center">
                            <a href="javascript:void(0,0);" class="link_pett_code" onclick="document.id('pett_code_temp').value='<?php echo $row->PETT_CODE; ?>';" ><?php echo $row->PETT_CODE; ?></a>
                        </td>
            			<td class="center">
                            <a href="javascript:void(0,0);" class="link_pett_code" onclick="document.id('pett_code_temp').value='<?php echo $row->PETT_CODE; ?>';" ><?php echo $row->PEDE_NAME; ?></a>
                        <?php //echo $row->PEDE_NAME; ?>
                        </td>
            			<td class="left">
                            <a href="javascript:void(0,0);" class="link_pett_code" onclick="document.id('pett_code_temp').value='<?php echo $row->PETT_CODE; ?>';" ><?php echo $row->PETT_NOTE; ?></a>
                        <?php //echo $row->PETT_NOTE; ?>
                        </td>
            		  </tr>
                    <?php
                        }
                    }else{
                    ?>
                        <tr>
                            <td class="center" colspan="3">データは見つかりませんでした</td>
                        </tr>
                    <?php    
                    }
                     ?>
                 
        		</tbody>
               
        	</table>
            <input type="hidden" name="pett_code_temp" id="pett_code_temp" value="" />
        </div>
    </div>
  
</div>
<script>
    jq(document).ready(function() {
        jq("#btnfind").click(function(){
                jq.ajax({
                  url: 'index.php?option=com_center&task=searchPett'
                    +'&PEDE_NAME='+encodeURI(jq('#PEDE_NAME').val()),
                  context: document.body
                }).done(function(data ) {
                  jq('#the_wrap').html(data);
                }); 
        })
        
        //clear
        jq("#btnclear").click(function(){
            jq("#PEDE_NAME").val(null);
            jq.ajax({
              url: 'index.php?option=com_center&task=clearSearchPett',
              context: document.body
            }).done(function(data ) {
              jq('#the_wrap').html(data);
            }); 
              
        })
        
    });
</script>
<?php 

$app = &JFactory::getApplication();
$app->close();

?>